import {createOvService} from "../../packages";
import {http} from "./http";
import {iOvMeta} from "../../packages/components/$ov/ov.utils";

export const ov = createOvService({
  getOvByTypes: async (types) => {
    const data = await http.post<{ list: iOvMeta[] }>('/ov/list', {
      all: true,
      filters: [{ field: 'type', value: types, operator: 'in' }],
    });
    return data.list;
  },
});
